﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using LoginServerControl;
using LoginCompositeControl;
namespace TestPages
{
    public partial class _default : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //  handler for server control
            ServerControl1.ButtonClicked += new EventHandler<ServerControlEventArgs>(ServerControl_Clicked);

            //   hadler for userControl
            LoginUserControls1.ButtonClicked += new EventHandler<UserControls.UserControlEventArgs>(UserControl_Click);

            //		hadler for userControl
            CompositeControl1.ButtonClicked += new EventHandler<LoginCompositeControl.CompositeControlEventArgs>(CompositeControl_Click);
        }

        protected void ServerControl_Clicked(object sender, ServerControlEventArgs e)
        {
            ServerControlStatus.Text = string.Format("User name:  {0}  Password:  {1}", e.UserName, e.Password);
        }
        protected void UserControl_Click(object sender, UserControls.UserControlEventArgs e)
        {
            UserControlStatus.Text = string.Format("User name:  {0}  Password:  {1}", e.UserName, e.Password);
        }
        protected void CompositeControl_Click(object sender, CompositeControlEventArgs e)
        {
            CompositeControlStatus.Text = string.Format("User name:  {0}  Password:  {1}", e.UserName, e.Password);
        }
    }



}